<template>
  <div class="footDom">
    <div class="imgBox" @click="toMode(1)">
      <img style="height: 30px;width:30px;" v-if="pType != 1" src="@/assets/gzt-noc.png" />
      <img style="height: 30px;width:30px;" v-else src="@/assets/gzt.png" />
      <div :class="pType == 1 ? 'parC' : ''">工作台</div>
    </div>
    <div class="imgBox" @click="toMode(2)">
      <img v-if="pType != 2" style="height: 30px;width:30px;" src="@/assets/mine-noc.png" />
      <img v-else style="height: 30px;width:30px;" src="@/assets/mine.png" />
      <div :class="pType == 2 ? 'parC' : ''">个人中心</div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    pType: {
      type: Number,
      default: 1,
    },
  },
  data() {
    return {};
  },
  methods: {
    toMode(val) {
      this.$emit("toMode", val);
    },
  },
};
</script>

<style>
.footDom {
  width: 100vw;
  height: 80px;
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  border-top: 1px #e3e3e3 solid;
  background-color: #fff;
  z-index: 9;
}
.imgBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  img {
    height: 30px;
  }
  .parC {
    color: var(--el-color-primary);
  }
}
.head {
  height: 60px;
  width: 100vw;
  line-height: 60px;
  background: var(--el-color-primary);
  color: #fff;
  font-weight: bold;
  text-align: center;
}
</style>
